package com.huawei.petSystemdemo.data;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.huawei.petSystemdemo.bean.Adress;
import com.huawei.petSystemdemo.bean.Commentpet;
import com.huawei.petSystemdemo.utils.MyRequest;


import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;


public class CommentRepository extends BaseRepository {
    public static void getAll(int petId, Consumer<List<Commentpet>> callback) {
        Map<String, Object> res = new HashMap<>();
        res.put("pet_id", petId);

        MyRequest.get("/comment/getAll", res,
                new ListDataConsumer<Commentpet>(Commentpet.class, callback, null));
    }
}